import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/schoolbranch/` + url, ...arg)

/**
 * 校区Api接口管理器
 *
 * @author zcb
 * @date  2023/06/06 12:01
 **/
export default {
	// 获取校区分页
	schoolBranchPage(data) {
		return request('page', data, 'get')
	},
	// 获取校区列表
	schoolBranchList(data) {
		return request('list', data, 'get')
	},
	// 提交校区表单 edit为true时为编辑，默认为新增
	schoolBranchSubmitForm(data, edit = false) {
		return request(edit ? 'add' : 'edit', data)
	},
	// 删除校区
	schoolBranchDelete(data) {
		return request('delete', data)
	},
	// 获取校区详情
	schoolBranchDetail(data) {
		return request('detail', data, 'get')
	}
}
